Update website - #236
Merged
Merged
Conversation
Ports the experimental collision force (previously written against regl) to the luma.gl rendering pipeline. Points push each other apart when they overlap, using a spatial-hash grid built with 4 offset passes to catch cell-boundary collisions. ForceCollision module: - build-grid pass (point list, additive) + force pass (fullscreen quad, additive accumulation into velocity Fbo) - GLSL ES 3.0 shaders with std140 uniform blocks, mirroring ForceManyBody Config: - simulationCollision — force strength (default 0, disabled) - simulationCollisionRadius — fixed radius; undefined/0 derives from point sizes - simulationCollisionPadding — extra gap between visual edges (default 0) Simulation integration: - Wired into simulation step, init, resource creation, and teardown - Collision runs after attraction forces (links, clusters) so springs don't re-create overlap within the same tick (fixes standing oscillation) - Per-pass correction capped to ~10% of collision radius to prevent overshoot ping-pong in dense areas - GPU resources (grid/size textures, programs) allocated lazily on first use; graphs that never enable collision pay no memory cost - Grid marked stale on point-size/position changes or radius/padding config changes Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
- Add simulationCollision, simulationCollisionRadius, and simulationCollisionPadding to the simulation configuration table in the Configuration docs, with recommended ranges and defaults. - List Collision alongside the other simulation forces in the configuration intro. - Add the Collision example to the README examples list. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
Co-Authored-By: Cursor <cursoragent@cursor.com> Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
Co-Authored-By: Cursor <cursoragent@cursor.com> Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
- Invalidate collision resources when pointDefaultSize changes in derived-radius mode (radius 0/undefined). The setConfig path updated point sizes but left the size-derived collision grid/size texture stale. - Clamp the force-pass cell coordinates to the grid bounds, matching build-grid.vert. Without this, a point that drifts more than one cell outside the space saw an all-out-of-bounds neighborhood and lost its collision response near borders. - Scan data.pointSizes with a loop instead of Math.max(...Array.from(...)); spreading a large typed array as arguments can throw a RangeError on big graphs before collision even initializes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
A large-graph stress test for the collision force: 50,000 points seeded with heavy overlap in a dense disc, so the spatial-hash collision force has to resolve a large number of overlaps every tick. Repulsion is off and a gentle gravity keeps the points packed so collision keeps working; the FPS monitor is enabled to read the cost under load. Lives under Examples/Forces alongside the Collision demo. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
…ptimize run Signed-off-by: Stukova Olya <stukova.o@gmail.com>
Signed-off-by: Stukova Olya <stukova.o@gmail.com>
…ntime Reported by CodeRabbit. Signed-off-by: Stukova Olya <stukova.o@gmail.com>
Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
Signed-off-by: Nikita Rokotyan <nikita@rokotyan.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.